﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Raven.Munin;

namespace MapMaker.Engine.Core.Models
{
    public class Event : DataModel
    {
        public int ID { get; set; }

        public string Name { get; set; }

        public int X { get; set; }

        public int Y { get; set; }

        public List<Page> Pages { get; set; }

        public class Page
        {
            public EventCondition Condition { get; set; }

            public EventGraphic Graphic { get; set; }

            public int MoveType { get; set; }

            public int MoveSpeed { get; set; }

            public int MoveFrequency { get; set; }

            public MoveRoute MoveRoute { get; set; }

            public bool WalkAnime { get; set; }

            public bool StepAnime { get; set; }

            public bool DirectionFix { get; set; }

            public bool Through { get; set; }

            public int PriorityType { get; set; }

            public int Trigger { get; set; }

            public List<EventCommand> List { get; set; }

            public class EventCondition
            {
                public bool Switch1Valid { get; set; }

                public bool Switch2Valid { get; set; }

                public bool VariableValid { get; set; }

                public bool SelfSwitchValid { get; set; }

                public bool ItemValid { get; set; }

                public bool ActorValid { get; set; }

                public int Switch1ID { get; set; }

                public int Switch2ID { get; set; }

                public int VariableID { get; set; }

                public int VariableValue { get; set; }

                public object SelfSwitchCh { get; set; }

                public Reference<Item> ItemID { get; set; }

                public Reference<Actor> ActorID { get; set; }
            }

            public class EventGraphic
            {
                public int TileID { get; set; }

                public string CharacterName { get; set; }

                public int CharacterIndex { get; set; }

                public int Direction { get; set; }

                public int Pattern { get; set; }
            }
        }

    }
}
